<template>
  <div class="home">
    <el-button type="primary" @click=test(1,2,3)>按钮</el-button>
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>卡片名称</span>
        <el-button style="float: right; padding: 3px 0" type="text"
          >操作按钮</el-button
        >
      </div>
      <div v-for="o in 4" :key="o" class="text item">
        {{ '列表内容 ' + o }}
      </div>
    </el-card>
    <div class="utils">
      <h4>url 参数转换</h4>
      <el-input
        v-model="url.navite"
        placeholder="输入url参数"
        size="normal"
        clearable
        @change="changeParams"
      ></el-input>
      <div>
        结果: {{ url.parse }}
        <!-- <el-input type="text" :rows="2" v-model="url.parse" placeholder="" 
          :maxlength="-1" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }">
        </el-input> -->
      </div>
    </div>
    <div style="height:500px;width:500px">
       <Map></Map>
    </div>
   
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
import Map from "@/components/Map.vue"
import Qs from 'qs'

import {log} from '@/utils/decorator'
export default {
  name: 'Home',
  components: {
    Map
  },
  data() {
    return {
      url: {
        native: '',
        parse: ''
      }
    }
  },
  mounted() {},
  methods: {
    changeParams(value) {
      this.url.parse = Qs.parse(value.split('?')[1])
    },
    @log()
    test(val){
      console.log(11111);
    }
  }
}
</script>
